image.png

End-Term / Final Project

AI for Research Proposal Automation

image.png

Business Problem - Create an AI system which will help you writing the research proposal aligning with the NOFO Document¶

Meet Dr. Ian McCulloh, a seasoned research advisor and a leading voice in interdisciplinary science. Over the years, his lab has explored everything from AI for counterterrorism to social network analysis in neuroscience. His publication portfolio is vast, rich, and... chaotic.

When the National Institute of Mental Health released a new NOFO (Notice of Funding Opportunity) seeking innovative digital health solutions for mental health equity, Dr. Ian saw an opportunity. But there was a problem: despite his extensive work, none of his existing research was directly aligned with digital mental health interventions. And with NIH deadlines looming, manually identifying relevant angles and generating a competitive proposal would be a massive lift.

Dr. Ian wished for a smart assistant—one that could digest his past work, interpret the NOFO’s intent, spark new research directions, and even help draft proposal sections.

The Challenge:

Organizations and researchers often maintain large archives of publications and prior work. When responding to competitive grants—especially highly specific ones like NIH NOFOs—it becomes extremely difficult and time-consuming to:

  1. Align past work with a new funding call.
  2. Extract relevant expertise from unrelated projects.
  3. Ideate novel, fundable research proposals tailored to complex criteria.
  4. Generate high-quality text for grant submission that satisfies technical and scientific review criteria.

The manual effort to sift through dense research documents, match them to nuanced funding criteria, and write compelling, compliant proposals is labor-intensive, inconsistent, and prone to missed opportunities.

The Case Study Approach¶

image.png

Objective

  1. Develop a generative AI-powered system using LLMs to automate and optimize the creation of NIH research proposals.
  2. The tool will identify relevant prior research, generate aligned project ideas, and draft high-quality proposal content tailored to specific NOFO requirements.

Setup - [2 Marks]¶


Note: 1 marks is awarded for the Embedding Model configuration and 1 mark for the LLM Configuration.

In [ ]:
# @title Run this cell => Restart the session => Start executing the below cells **(DO NOT EXECUTE THIS CELL AGAIN)**
#
#!pip install -q langchain==0.3.21 \
#                huggingface_hub==0.29.3 \
#                openai==1.68.2 \
#                chromadb==0.6.3 \
#                langchain-community==0.3.20 \
#                langchain_openai==0.3.10 \
#                lark==1.2.2\
#                rank_bm25==0.2.2\
#                numpy==2.2.4 \
#                scipy==1.15.2 \
#                scikit-learn==1.6.1 \
#                transformers==4.50.0 \
#                pypdf==5.4.0 \
#                markdown-pdf==1.7 \
#                tiktoken==0.9.0 \
#                sentence_transformers==4.0.0 \
#                torch==2.6.0+cu124
In [ ]:
# @title Loading the `config.json` file
#import json
#import os
#
# Load the JSON file and extract values
#file_name = '../../config.json'
#with open(file_name, 'r') as file:
#    config = json.load(file)
#    os.environ['API_KEY'] = config.get("API_KEY") # Loading the API Key
#    os.environ["OPENAI_API_BASE"] = config.get("OPENAI_API_BASE") # Loading the API Base Url
#    os.environ["MODEL"] = config.get("MODEL")
In [ ]:
# @title Defining the LLM Model - Use `gpt-4o-mini` Model
#from langchain_openai import ChatOpenAI
#llm = model = ChatOpenAI(
#        model_name=model_name,
#        openai_api_key=oai_key,
#        openai_api_base=oai_base,
#        temperature=0
#    )
In [80]:
from dotenv import load_dotenv, find_dotenv
_ = load_dotenv(find_dotenv())

import warnings
warnings.filterwarnings('ignore')
import os
from langchain_openai import ChatOpenAI
from langchain.document_loaders import PyPDFLoader
from langchain_core.prompts.chat import ChatPromptTemplate
import zipfile
import tiktoken
import re
import json
from markdown_pdf import MarkdownPdf, Section
In [23]:
oai_key = os.environ.get("OPENAI_API_KEY")
oai_base = os.environ.get("OPENAI_API_BASE")
model = os.environ.get("MODEL")
In [84]:
def invoke_openai_chat(prompt, model_name, oai_key, oai_base, temperature=0):
    model = ChatOpenAI(
        model_name=model_name,
        openai_api_key=oai_key,
        openai_api_base=oai_base,
        temperature=temperature
    )
    
    response = model.invoke(prompt)

    return response

def regex_valid_json(response_str):
    """
    Check if the response string contains valid JSON.
    """
    match = re.search(r'```json\s*([\s\S]+?)\s*```', response_str)
    if not match:
        return response_str
    else:
        json_str = match.group(1)
        json_str = json_str.encode().decode('unicode_escape')
        return json_str
In [25]:
smoke_test = invoke_openai_chat("Hello?", model, oai_key, oai_base, temperature=0)
print(smoke_test.content)
Hello! How can I assist you today?

Step 1: Topic Extraction - [3 Marks]¶

Read the NOFO doc and identify the topic for which the funding is to be given.


Note: 2 marks are awarded for the prompt and 1 mark for the successful completion of this section, including debugging or modifying the code if necessary.

In [28]:
# Reading the NOFO Document
pdf_file = "/Users/mjn/code/data/gaif/ProjectFiles/NOFO.pdf"
pdf_loader = PyPDFLoader(pdf_file);
NOFO_pdf = pdf_loader.load()
Ignoring wrong pointing object 10 0 (offset 0)
Ignoring wrong pointing object 69 0 (offset 0)
Ignoring wrong pointing object 90 0 (offset 0)

TASK: Write an LLM prompt to extract the Topic for what the funding is been provided, from the NOFO document, Ask the LLM to respond back with the topic name only and nothing else.

In [29]:
topic_extraction_prompt_template = ChatPromptTemplate.from_messages([
    ("system", "You are an expert at extracting grant topics from government funding documents."),
    ("user", 
     """Extract the main topic or subject for which funding is being provided in the following Notice of Funding Opportunity (NOFO) document.

Respond with only the topic name or phrase. Do not include any explanation or extra words.

NOFO content:
{nofo_content}
""")
])
topic_extraction_prompt = topic_extraction_prompt_template.format(nofo_content=NOFO_pdf)
In [30]:
# Finding the topic for which the Funding is been given
topic_extraction = invoke_openai_chat(topic_extraction_prompt, model, oai_key, oai_base, temperature=0)
topic = topic_extraction.content
print(topic)
Digital mental health interventions

Step 2: Research Paper Relevance Assessment - [3 Marks]¶

Analyze all the Research Papers and filter out the research papers based on the topic of NOFO


Note: 2 marks are awarded for the prompt and 1 mark for the successful completion of this section, including debugging or modifying the code if necessary.

TASK: Write an Prompt which can be used to analyze the relevance of the provided research paper in relation to the topic outlined in the NOFO (Notice of Funding Opportunity) document. Determine whether the research aligns with the goals, objectives, and funding criteria specified in the NOFO. Additionally, assess whether the research paper can be used to support or develop a viable project idea that fits within the scope of the funding opportunity.


Note: If the paper does not significantly relate to the topic—by domain, method, theory, or application ask the LLM to return: "PAPER NOT RELATED TO TOPIC"


Ask the LLM to respond in the below specified structure:

### Output Format:
"summary": "<summary of the paper under 300 words, or return: PAPER NOT RELATED TO TOPIC>"

In [ ]:
# Unzipping the Research Papers - Replace your zip file path and extarct it in the contents folder only
with zipfile.ZipFile("/Users/mjn/code/data/gaif/ProjectFiles/ResearchPapers.zip", 'r') as zip_ref:
  zip_ref.extractall("/content/") # No changes needed here
In [31]:
relevance_prompt_template = ChatPromptTemplate.from_messages([
    ("system", "You are an expert at matching research papers to funding opportunities."),
    ("user", """
Given the following Notice of Funding Opportunity (NOFO) details and research paper, determine whether the paper is relevant to the topic as
outlined by the NOFO. Assess whether the research aligns with the goals, objectives, and funding criteria, and whether it could support or develop
a viable project idea for this funding opportunity.

Instructions:
- If the paper does not significantly relate to the topic (by domain, method, theory, or application), respond only with: PAPER NOT RELATED TO TOPIC
- If the paper is relevant, summarize in under 300 words how it aligns with the NOFO.

Respond in with the following format:

"summary": "<summary of the paper under 300 words, or return: PAPER NOT RELATED TO TOPIC>"


NOFO Topic and Criteria:
{nofo_content}

Research Paper Content:
{paper_content}
""")
])
In [32]:
# Reading all PDF files and storing it in 1 variable
#path = "/Users/mjn/code/data/gaif/ProjectFiles/content/PapersTest/"
path = "/Users/mjn/code/data/gaif/ProjectFiles/content/Papers/"
documents = []
total_files  = len(os.listdir(path))

## Defining the max tokens to avoid error for context being to long
encoding = tiktoken.encoding_for_model("gpt-4o-mini")
MAX_TOKENS = 127500

progress_cnt = 1
relevant_papers_count = 0
irrelevant_papers_count = 0

for filename in os.listdir(path):
    if filename.endswith('.pdf'):
        file_path = os.path.join(path, filename)

        try:
            # Load PDF
            docs = PyPDFLoader(file_path,mode="single").load()
            # extracting the pages
            pages = docs[0].page_content

            # combining the prompt with the pages of the research paper within the context length
            relevance_prompt = relevance_prompt_template.format(nofo_content=topic, paper_content="Temp")
            available_tokens = MAX_TOKENS - len(encoding.encode(relevance_prompt))
            truncated_pages = encoding.decode(encoding.encode(pages)[:available_tokens])
            #full_prompt = relevance_prompt + truncated_pages
            relevance_prompt = relevance_prompt_template.format(nofo_content=topic, paper_content=truncated_pages)

            # Calling the LLM
            #response = llm.invoke(full_prompt)
            relevance = invoke_openai_chat(relevance_prompt, model, oai_key, oai_base, temperature=0)
            
            if progress_cnt % 10 == 0:
                print(f"Successfully processed: {progress_cnt}/{total_files}")            
            progress_cnt += 1

            #  If the paper is not relevant skipping the paper
            if  "PAPER NOT RELATED TO TOPIC" in relevance.content:
                irrelevant_papers_count += 1
            else:
                #  If the paper is relevant adding it to the documents variable
                documents.append({ 'title': filename, 'llm_response': relevance.content, 'file_path':file_path})
                relevant_papers_count += 1

        except Exception as e:
            print(f"!!! Error processing {filename}: {str(e)}")


print("="*50)
print(f"Relevant Papers: {relevant_papers_count}/{total_files}")
print(f"Irrelevant Papers: {irrelevant_papers_count}/{total_files}")
Ignoring wrong pointing object 8 0 (offset 0)
Ignoring wrong pointing object 10 0 (offset 0)
Ignoring wrong pointing object 24 0 (offset 0)
Ignoring wrong pointing object 38 0 (offset 0)
Ignoring wrong pointing object 8 0 (offset 0)
Ignoring wrong pointing object 10 0 (offset 0)
Ignoring wrong pointing object 12 0 (offset 0)
Ignoring wrong pointing object 14 0 (offset 0)
Ignoring wrong pointing object 16 0 (offset 0)
Ignoring wrong pointing object 8 0 (offset 0)
Ignoring wrong pointing object 10 0 (offset 0)
Ignoring wrong pointing object 12 0 (offset 0)
Ignoring wrong pointing object 27 0 (offset 0)
Ignoring wrong pointing object 68 0 (offset 0)
Successfully processed: 10/112
Ignoring wrong pointing object 8 0 (offset 0)
Ignoring wrong pointing object 11 0 (offset 0)
Ignoring wrong pointing object 14 0 (offset 0)
Ignoring wrong pointing object 34 0 (offset 0)
Ignoring wrong pointing object 47 0 (offset 0)
Ignoring wrong pointing object 8 0 (offset 0)
Ignoring wrong pointing object 10 0 (offset 0)
Ignoring wrong pointing object 12 0 (offset 0)
Ignoring wrong pointing object 14 0 (offset 0)
Ignoring wrong pointing object 16 0 (offset 0)
Ignoring wrong pointing object 18 0 (offset 0)
Ignoring wrong pointing object 28 0 (offset 0)
Successfully processed: 20/112
Ignoring wrong pointing object 8 0 (offset 0)
Ignoring wrong pointing object 10 0 (offset 0)
Ignoring wrong pointing object 13 0 (offset 0)
Ignoring wrong pointing object 22 0 (offset 0)
Ignoring wrong pointing object 24 0 (offset 0)
Ignoring wrong pointing object 27 0 (offset 0)
Ignoring wrong pointing object 8 0 (offset 0)
Ignoring wrong pointing object 10 0 (offset 0)
Ignoring wrong pointing object 12 0 (offset 0)
Ignoring wrong pointing object 40 0 (offset 0)
Successfully processed: 30/112
Ignoring wrong pointing object 8 0 (offset 0)
Ignoring wrong pointing object 12 0 (offset 0)
Ignoring wrong pointing object 14 0 (offset 0)
Ignoring wrong pointing object 16 0 (offset 0)
Ignoring wrong pointing object 26 0 (offset 0)
Ignoring wrong pointing object 28 0 (offset 0)
Successfully processed: 40/112
Ignoring wrong pointing object 6 0 (offset 0)
Ignoring wrong pointing object 15 0 (offset 0)
Ignoring wrong pointing object 26 0 (offset 0)
Successfully processed: 50/112
Ignoring wrong pointing object 18 0 (offset 0)
Ignoring wrong pointing object 20 0 (offset 0)
Ignoring wrong pointing object 48 0 (offset 0)
Ignoring wrong pointing object 92 0 (offset 0)
Multiple definitions in dictionary at byte 0x8fa1a for key /PageMode
Successfully processed: 60/112
Ignoring wrong pointing object 8 0 (offset 0)
Ignoring wrong pointing object 14 0 (offset 0)
Ignoring wrong pointing object 16 0 (offset 0)
Ignoring wrong pointing object 25 0 (offset 0)
Ignoring wrong pointing object 27 0 (offset 0)
Ignoring wrong pointing object 50 0 (offset 0)
Ignoring wrong pointing object 8 0 (offset 0)
Ignoring wrong pointing object 10 0 (offset 0)
Ignoring wrong pointing object 12 0 (offset 0)
Ignoring wrong pointing object 20 0 (offset 0)
Ignoring wrong pointing object 26 0 (offset 0)
Ignoring wrong pointing object 39 0 (offset 0)
Ignoring wrong pointing object 41 0 (offset 0)
Ignoring wrong pointing object 21 0 (offset 0)
Ignoring wrong pointing object 23 0 (offset 0)
Ignoring wrong pointing object 27 0 (offset 0)
Ignoring wrong pointing object 29 0 (offset 0)
Ignoring wrong pointing object 41 0 (offset 0)
Ignoring wrong pointing object 43 0 (offset 0)
Ignoring wrong pointing object 52 0 (offset 0)
Ignoring wrong pointing object 83 0 (offset 0)
Successfully processed: 70/112
Ignoring wrong pointing object 9 0 (offset 0)
Ignoring wrong pointing object 51 0 (offset 0)
Ignoring wrong pointing object 54 0 (offset 0)
Ignoring wrong pointing object 56 0 (offset 0)
Successfully processed: 80/112
Ignoring wrong pointing object 8 0 (offset 0)
Ignoring wrong pointing object 10 0 (offset 0)
Ignoring wrong pointing object 12 0 (offset 0)
Ignoring wrong pointing object 14 0 (offset 0)
Ignoring wrong pointing object 16 0 (offset 0)
Ignoring wrong pointing object 18 0 (offset 0)
Ignoring wrong pointing object 26 0 (offset 0)
Ignoring wrong pointing object 28 0 (offset 0)
Ignoring wrong pointing object 38 0 (offset 0)
Ignoring wrong pointing object 10 0 (offset 0)
Ignoring wrong pointing object 15 0 (offset 0)
Ignoring wrong pointing object 19 0 (offset 0)
Ignoring wrong pointing object 30 0 (offset 0)
Ignoring wrong pointing object 32 0 (offset 0)
Ignoring wrong pointing object 44 0 (offset 0)
Successfully processed: 90/112
Ignoring wrong pointing object 8 0 (offset 0)
Ignoring wrong pointing object 10 0 (offset 0)
Ignoring wrong pointing object 12 0 (offset 0)
Ignoring wrong pointing object 14 0 (offset 0)
Ignoring wrong pointing object 16 0 (offset 0)
Ignoring wrong pointing object 25 0 (offset 0)
Ignoring wrong pointing object 35 0 (offset 0)
Ignoring wrong pointing object 37 0 (offset 0)
Ignoring wrong pointing object 39 0 (offset 0)
Ignoring wrong pointing object 41 0 (offset 0)
Ignoring wrong pointing object 43 0 (offset 0)
Ignoring wrong pointing object 45 0 (offset 0)
Ignoring wrong pointing object 53 0 (offset 0)
Ignoring wrong pointing object 55 0 (offset 0)
Ignoring wrong pointing object 57 0 (offset 0)
Ignoring wrong pointing object 59 0 (offset 0)
Ignoring wrong pointing object 61 0 (offset 0)
Ignoring wrong pointing object 8 0 (offset 0)
Ignoring wrong pointing object 10 0 (offset 0)
Ignoring wrong pointing object 12 0 (offset 0)
Ignoring wrong pointing object 14 0 (offset 0)
Ignoring wrong pointing object 16 0 (offset 0)
Ignoring wrong pointing object 6 0 (offset 0)
Ignoring wrong pointing object 8 0 (offset 0)
Ignoring wrong pointing object 10 0 (offset 0)
Ignoring wrong pointing object 12 0 (offset 0)
Ignoring wrong pointing object 36 0 (offset 0)
Ignoring wrong pointing object 38 0 (offset 0)
Ignoring wrong pointing object 40 0 (offset 0)
Ignoring wrong pointing object 42 0 (offset 0)
Ignoring wrong pointing object 52 0 (offset 0)
Ignoring wrong pointing object 54 0 (offset 0)
Successfully processed: 100/112
Ignoring wrong pointing object 11 0 (offset 0)
Ignoring wrong pointing object 13 0 (offset 0)
Ignoring wrong pointing object 58 0 (offset 0)
Ignoring wrong pointing object 69 0 (offset 0)
Ignoring wrong pointing object 71 0 (offset 0)
Ignoring wrong pointing object 73 0 (offset 0)
Ignoring wrong pointing object 75 0 (offset 0)
Ignoring wrong pointing object 88 0 (offset 0)
Ignoring wrong pointing object 90 0 (offset 0)
Ignoring wrong pointing object 96 0 (offset 0)
Ignoring wrong pointing object 98 0 (offset 0)
Ignoring wrong pointing object 141 0 (offset 0)
Ignoring wrong pointing object 143 0 (offset 0)
Ignoring wrong pointing object 150 0 (offset 0)
Ignoring wrong pointing object 156 0 (offset 0)
Ignoring wrong pointing object 191 0 (offset 0)
Ignoring wrong pointing object 193 0 (offset 0)
Ignoring wrong pointing object 200 0 (offset 0)
Ignoring wrong pointing object 206 0 (offset 0)
Ignoring wrong pointing object 249 0 (offset 0)
Ignoring wrong pointing object 251 0 (offset 0)
Ignoring wrong pointing object 261 0 (offset 0)
Ignoring wrong pointing object 271 0 (offset 0)
Ignoring wrong pointing object 323 0 (offset 0)
Ignoring wrong pointing object 325 0 (offset 0)
Ignoring wrong pointing object 345 0 (offset 0)
Ignoring wrong pointing object 352 0 (offset 0)
Ignoring wrong pointing object 397 0 (offset 0)
Ignoring wrong pointing object 400 0 (offset 0)
Ignoring wrong pointing object 402 0 (offset 0)
Ignoring wrong pointing object 416 0 (offset 0)
Ignoring wrong pointing object 444 0 (offset 0)
Ignoring wrong pointing object 473 0 (offset 0)
Ignoring wrong pointing object 475 0 (offset 0)
Ignoring wrong pointing object 506 0 (offset 0)
Ignoring wrong pointing object 512 0 (offset 0)
Ignoring wrong pointing object 522 0 (offset 0)
Ignoring wrong pointing object 710 0 (offset 0)
Ignoring wrong pointing object 712 0 (offset 0)
Ignoring wrong pointing object 718 0 (offset 0)
Ignoring wrong pointing object 724 0 (offset 0)
Ignoring wrong pointing object 730 0 (offset 0)
Ignoring wrong pointing object 900 0 (offset 0)
Ignoring wrong pointing object 902 0 (offset 0)
Ignoring wrong pointing object 904 0 (offset 0)
Ignoring wrong pointing object 942 0 (offset 0)
Ignoring wrong pointing object 954 0 (offset 0)
Ignoring wrong pointing object 1094 0 (offset 0)
Ignoring wrong pointing object 1146 0 (offset 0)
Ignoring wrong pointing object 1148 0 (offset 0)
Ignoring wrong pointing object 1150 0 (offset 0)
Ignoring wrong pointing object 1156 0 (offset 0)
Ignoring wrong pointing object 1179 0 (offset 0)
Ignoring wrong pointing object 1271 0 (offset 0)
Ignoring wrong pointing object 1273 0 (offset 0)
Ignoring wrong pointing object 1292 0 (offset 0)
Ignoring wrong pointing object 1302 0 (offset 0)
Ignoring wrong pointing object 1321 0 (offset 0)
Ignoring wrong pointing object 1356 0 (offset 0)
Ignoring wrong pointing object 1358 0 (offset 0)
Ignoring wrong pointing object 1368 0 (offset 0)
Ignoring wrong pointing object 1370 0 (offset 0)
Ignoring wrong pointing object 1425 0 (offset 0)
Ignoring wrong pointing object 1427 0 (offset 0)
Ignoring wrong pointing object 1429 0 (offset 0)
Ignoring wrong pointing object 1452 0 (offset 0)
Ignoring wrong pointing object 1458 0 (offset 0)
Ignoring wrong pointing object 1460 0 (offset 0)
Ignoring wrong pointing object 1462 0 (offset 0)
Ignoring wrong pointing object 1497 0 (offset 0)
Ignoring wrong pointing object 1538 0 (offset 0)
Ignoring wrong pointing object 1544 0 (offset 0)
Ignoring wrong pointing object 1575 0 (offset 0)
Ignoring wrong pointing object 1577 0 (offset 0)
Ignoring wrong pointing object 1592 0 (offset 0)
Ignoring wrong pointing object 1598 0 (offset 0)
Ignoring wrong pointing object 1625 0 (offset 0)
Ignoring wrong pointing object 1627 0 (offset 0)
Ignoring wrong pointing object 1629 0 (offset 0)
Ignoring wrong pointing object 1639 0 (offset 0)
Ignoring wrong pointing object 1645 0 (offset 0)
Ignoring wrong pointing object 8 0 (offset 0)
Ignoring wrong pointing object 10 0 (offset 0)
Ignoring wrong pointing object 13 0 (offset 0)
Ignoring wrong pointing object 22 0 (offset 0)
Ignoring wrong pointing object 24 0 (offset 0)
Ignoring wrong pointing object 27 0 (offset 0)
Successfully processed: 110/112
==================================================
Relevant Papers: 6/112
Irrelevant Papers: 106/112
In [33]:
documents
Out[33]:
[{'title': 'Social Media Mental Health Final.pdf',
  'llm_response': '```json\n{\n  "summary": "The research paper \'Fragile Minds: Exploring the Link Between Social Media and Young Adult Mental Health\' is relevant to the NOFO topic of digital mental health interventions. The paper investigates the correlation between social media usage and mental health concerns among college students, focusing on platforms like TikTok and Instagram. It examines the relationship between social media use and mental health indicators such as loneliness, fear of missing out (FoMO), and personality traits. The study finds moderate correlations between social media use and these mental health indicators, suggesting that while social media use is linked to mental health issues, it is not the sole factor. The paper highlights the need for further research to understand the impact of social media\'s shift from text to video content on mental health. This aligns with the NOFO\'s goal of exploring digital interventions for mental health, as understanding these correlations can inform the development of targeted digital mental health strategies and interventions."\n}\n```',
  'file_path': '/Users/mjn/code/data/gaif/ProjectFiles/content/Papers/Social Media Mental Health Final.pdf'},
 {'title': 'Helene_and_Milton_ACM.pdf',
  'llm_response': '```json\n"summary": "The research paper \'Building Bridges between Users and Content across Multiple Platforms during Natural Disasters\' does not align with the NOFO topic of digital mental health interventions. The paper focuses on the role of social media in information dissemination during natural disasters, specifically analyzing how \'bridges\'—connections between users and content across platforms like X, YouTube, and Reddit—facilitate information flow. It examines the characteristics of these bridges, such as platform tendencies, content complexity, and user types, including the role of bots. While the study provides insights into social media dynamics during crises, it does not address digital mental health interventions, which are the focus of the NOFO. Therefore, the paper is not relevant to the funding opportunity aimed at digital mental health solutions."\n```',
  'file_path': '/Users/mjn/code/data/gaif/ProjectFiles/content/Papers/Helene_and_Milton_ACM.pdf'},
 {'title': 'HIV.pdf',
  'llm_response': '```json\n"summary": "The research paper by Yang et al. focuses on evaluating the persuasiveness of PrEP (pre-exposure prophylaxis) promotion messages among men who have sex with men (MSM) using a neuro-influence experiment. The study employs near-infrared spectroscopy (fNIRS) to measure brain activation in response to different PrEP promotion messages. While the paper is centered on health communication and the effectiveness of PrEP promotion, it does not directly align with the NOFO topic of digital mental health interventions. The study\'s primary focus is on HIV prevention and the use of neuroimaging to assess message persuasiveness, rather than on digital interventions for mental health. Therefore, the paper does not significantly relate to the NOFO topic of digital mental health interventions."\n```',
  'file_path': '/Users/mjn/code/data/gaif/ProjectFiles/content/Papers/HIV.pdf'},
 {'title': 'Arrow White Paper DExTra.pdf',
  'llm_response': '"summary": "The research paper titled \'Dopamine Expression Tracking (DExTra)\' is not directly aligned with the NOFO topic of digital mental health interventions. The paper primarily focuses on developing a tool that integrates eye-tracking and facial expression recognition technologies to assess adversarial propaganda and psychological operations, as well as to serve as a diagnostic tool for dopamine deficiencies. While the paper mentions potential applications in healthcare, particularly in diagnosing conditions like substance use disorders and Parkinson\'s disease, its primary focus is on information warfare and neuromarketing. The proposed technology aims to measure brain responses to media stimuli and assess the effectiveness of influence operations, which falls outside the scope of digital mental health interventions as outlined by the NOFO. Therefore, the paper does not significantly relate to the topic of digital mental health interventions."',
  'file_path': '/Users/mjn/code/data/gaif/ProjectFiles/content/Papers/Arrow White Paper DExTra.pdf'},
 {'title': 'YouTube-COVID.pdf',
  'llm_response': '```json\n"summary": "The research paper focuses on analyzing YouTube video content related to COVID-19, specifically examining the engagement and polarization of videos discussing public health interventions. While the paper does not directly address digital mental health interventions, it provides insights into how social media platforms like YouTube can influence public perception and behavior regarding health interventions. The study\'s methodology of quantifying engagement and polarization could be relevant for digital mental health interventions by understanding how mental health content is received and shared on social media. Additionally, the findings about the role of YouTube\'s search algorithm in promoting certain types of content could inform strategies for disseminating digital mental health resources effectively. However, the paper\'s primary focus is on COVID-19 interventions, not mental health, making its relevance to the NOFO topic indirect."\n```',
  'file_path': '/Users/mjn/code/data/gaif/ProjectFiles/content/Papers/YouTube-COVID.pdf'},
 {'title': 'White Paper Brain Gaze.pdf',
  'llm_response': '```json\n{\n  "summary": "The research paper from the Brain Rise Foundation outlines the development of a non-invasive AI diagnostic tool to measure synaptic dopamine changes using webcam technology. This tool aims to address various interdisciplinary applications, including addiction treatment, neurological conditions, and health communication. The paper\'s focus on addiction and mental health aligns with the NOFO topic of digital mental health interventions. The proposed technology could significantly enhance digital mental health interventions by providing a novel method to monitor and understand dopamine-related neural activities, which are crucial in addiction and mental health disorders. The integration of eye-tracking and facial expression recognition technologies to infer dopamine levels could offer a new dimension in digital mental health diagnostics, potentially leading to more personalized and effective interventions. The research also emphasizes the importance of AI in developing these tools, which aligns with the digital aspect of the NOFO. By providing a non-invasive, real-time analysis of dopamine levels, the proposed tool could support the development of digital mental health interventions that are more responsive to the physiological and emotional states of individuals, thereby improving treatment outcomes. Overall, the paper\'s objectives and methodologies are relevant to the NOFO\'s goals of advancing digital mental health solutions."\n}\n```',
  'file_path': '/Users/mjn/code/data/gaif/ProjectFiles/content/Papers/White Paper Brain Gaze.pdf'}]

Step 3: Proposal Ideation Based on Filtered Research - [4 marks]¶

Use the filtered papers, to generate ideas for the Reseach Proposal.


Note: 2 marks are awarded for the prompt, 1 mark for the Generating Idea and 1 mark for fetching file path of chosen idea along with successful completion of this section, including debugging or modifying the code if necessary.

TASK: Write an Prompt which can be used to generate 5 ideas for the Research Proposal, each idea should consist:

  1. Idea X: [Concise Title of the Project Idea] \n
  2. Description: [Brief and targeted description summarizing the objectives, innovative elements, scientific rationale, and anticipated impact.] \n
  3. Citation: [Author(s), Year or Paper Title] \n
  4. NOFO Alignment: [List two or more specific NOFO requirements that this idea directly addresses] \n
  5. File Path of the Research Paper: [Exact file path, ending in .pdf]
  • Use the Delimiter --- for defining the structure of the sample outputs in the prompt

Generating 5 Ideas¶

In [37]:
gen_idea_template = ChatPromptTemplate.from_messages([
    ("system", "You are a tenured professor and doctor with expertise in digital mental health interventions."),
    ("user", """
Please review the provided research paper summaries that include a research paper title, summary, and file_path.

Please generate 5 potential research ideas based on these papers that align to the notice of funding opportuity topic: {nofo_topic}.

Respond in with the following format:

Idea X: [Concise Title of the Project Idea]
Description: [Brief and targeted description summarizing the objectives, innovative elements, scientific rationale, and anticipated impact.]
Citation: [Author(s), Year or Paper Title]
NOFO Alignment: [List two or more specific NOFO requirements that this idea directly addresses]
File Path of the Research Paper: [Exact file path, ending in .pdf]

Use the Delimiter --- between each idea.

Research Paper Content:
{paper_summaries}
""")
])
gen_idea_prompt = gen_idea_template.format(nofo_topic=topic, paper_summaries=str(documents))
In [38]:
ideas = invoke_openai_chat(gen_idea_prompt, model, oai_key, oai_base, temperature=0)
In [39]:
from IPython.display import Markdown, display
display(Markdown(ideas.content))

Idea 1: Social Media Usage and Mental Health: Developing Targeted Interventions for Young Adults
Description: This project aims to develop and test digital interventions targeting mental health issues linked to social media usage among young adults. By leveraging insights from the correlation between social media use and mental health indicators such as loneliness and FoMO, the project will create personalized digital tools to mitigate these effects. The innovative element lies in using real-time data from social media interactions to tailor interventions. The anticipated impact is a reduction in mental health issues among young adults through more effective, personalized digital interventions.
Citation: Fragile Minds: Exploring the Link Between Social Media and Young Adult Mental Health
NOFO Alignment:

  • Development of digital mental health interventions targeting specific populations.
  • Utilization of data-driven approaches to enhance intervention effectiveness.
    File Path of the Research Paper: /Users/mjn/code/data/gaif/ProjectFiles/content/Papers/Social Media Mental Health Final.pdf

Idea 2: Enhancing Digital Mental Health Content Dissemination on YouTube
Description: This project will explore strategies to optimize the dissemination of digital mental health resources on YouTube, focusing on engagement and reducing polarization. By analyzing the platform's algorithm and user interaction patterns, the project aims to develop guidelines for creating and promoting mental health content that maximizes reach and impact. The innovative aspect is the application of engagement and polarization metrics to mental health content. The anticipated impact is improved public access to reliable mental health information and resources.
Citation: Analyzing YouTube Video Content Related to COVID-19
NOFO Alignment:

  • Strategies for effective dissemination of digital mental health resources.
  • Leveraging social media platforms to enhance public access to mental health interventions.
    File Path of the Research Paper: /Users/mjn/code/data/gaif/ProjectFiles/content/Papers/YouTube-COVID.pdf

Idea 3: AI-Driven Diagnostics for Personalized Digital Mental Health Interventions
Description: This project proposes the development of an AI-based diagnostic tool using webcam technology to monitor synaptic dopamine changes, which are crucial in mental health disorders. By integrating eye-tracking and facial expression recognition, the tool will provide real-time data to personalize digital mental health interventions. The innovative element is the non-invasive, real-time analysis of dopamine levels to tailor interventions. The anticipated impact is enhanced treatment outcomes through personalized, responsive digital mental health solutions.
Citation: Development of a Non-Invasive AI Diagnostic Tool to Measure Synaptic Dopamine Changes
NOFO Alignment:

  • Advancement of AI technologies in digital mental health diagnostics.
  • Personalization of digital mental health interventions based on physiological data.
    File Path of the Research Paper: /Users/mjn/code/data/gaif/ProjectFiles/content/Papers/White Paper Brain Gaze.pdf

Idea 4: Video Content and Mental Health: Understanding the Impact of Social Media's Shift
Description: This project will investigate the impact of social media's shift from text to video content on mental health, focusing on platforms like TikTok and Instagram. By analyzing user interactions and mental health indicators, the project aims to develop digital interventions that address the unique challenges posed by video content. The innovative aspect is the focus on video content's specific impact on mental health. The anticipated impact is the development of more effective digital mental health strategies for video-centric social media platforms.
Citation: Fragile Minds: Exploring the Link Between Social Media and Young Adult Mental Health
NOFO Alignment:

  • Exploration of new digital media formats in mental health interventions.
  • Development of targeted interventions for emerging social media trends.
    File Path of the Research Paper: /Users/mjn/code/data/gaif/ProjectFiles/content/Papers/Social Media Mental Health Final.pdf

Idea 5: Neuro-Influence and Mental Health Messaging: A Digital Approach
Description: This project will explore the use of neuro-influence techniques to enhance the effectiveness of digital mental health messaging. By employing neuroimaging tools like fNIRS, the project will assess brain activation in response to different mental health messages, aiming to optimize message design for digital platforms. The innovative element is the application of neuro-influence to digital mental health communication. The anticipated impact is improved engagement and effectiveness of mental health messaging through scientifically informed design.
Citation: Evaluating the Persuasiveness of PrEP Promotion Messages Using Neuro-Influence
NOFO Alignment:

  • Integration of neuroscience in digital mental health communication strategies.
  • Enhancement of digital mental health messaging effectiveness.
    File Path of the Research Paper: /Users/mjn/code/data/gaif/ProjectFiles/content/Papers/HIV.pdf

Choosing 1 Idea and fetching details¶

In [62]:
# Modify the idea_number for choosing the different idea
idea_number = 4  # change the number if you wish to choose and generate the research proposal for another idea
chosen_idea = ideas.content.split("---")[idea_number]
In [64]:
chosen_idea
Out[64]:
"\n\n**Idea 4: Video Content and Mental Health: Understanding the Impact of Social Media's Shift**  \n**Description:** This project will investigate the impact of social media's shift from text to video content on mental health, focusing on platforms like TikTok and Instagram. By analyzing user interactions and mental health indicators, the project aims to develop digital interventions that address the unique challenges posed by video content. The innovative aspect is the focus on video content's specific impact on mental health. The anticipated impact is the development of more effective digital mental health strategies for video-centric social media platforms.  \n**Citation:** Fragile Minds: Exploring the Link Between Social Media and Young Adult Mental Health  \n**NOFO Alignment:**  \n- Exploration of new digital media formats in mental health interventions.  \n- Development of targeted interventions for emerging social media trends.  \n**File Path of the Research Paper:** /Users/mjn/code/data/gaif/ProjectFiles/content/Papers/Social Media Mental Health Final.pdf\n\n"
In [65]:
# Use a regular expression to find the file path of the research paper

pattern = r"File Path of the Research Paper:\*\*\s*(.+?)\n"
# If you are unable to extract the file path successfully using this pattern, use the `ChatGPT` or any other LLM to find the pattern that works for you, simply provide the LLM the sample response of your whole ideas and ask the LLM to generate the regex patterm for extracting the "File Path of the Research Paper"

match = re.search(pattern, chosen_idea)

if match:
  idea_generated_from_research_paper = match.group(1).strip()
  print("Filepath : ", idea_generated_from_research_paper)
else:
  print("File Path of the Research Paper not found in the chosen idea.")
Filepath :  /Users/mjn/code/data/gaif/ProjectFiles/content/Papers/Social Media Mental Health Final.pdf

Step 4: Proposal Blueprint Preparation - [3 Marks]¶

Select appropriate research ideas for the proposal and supply 'Sample Research Proposals' as templates to the LLM to support the generation of the final proposal.


Note: 2 marks are awarded for the prompt and 1 mark for the successful completion of this section, including debugging or modifying the code if necessary.

TASK: Write an Prompt which can be used to generate the Research Proposal.

The prompt should be able to craft a research proposal based on the sample research proposal template, using one of the ideas generated above. The proposal should include references to the actual research papers from which the ideas are derived and should align well with the NOFO documents.

In [67]:
# Here we need to add the full papers instead of the summary
chosen_idea_rp = PyPDFLoader(idea_generated_from_research_paper, mode="single").load()

# Loading the sample research proposal template
research_proposal_template = PyPDFLoader("/Users/mjn/code/data/gaif/ProjectFiles/Research Proposal Template.pdf", mode="single").load()
In [69]:
research_proposal_template = ChatPromptTemplate.from_messages([
    ("system", "You are a tenured professor and doctor with expertise in digital mental health interventions."),
    ("user", """
Please review the provided idea for a research effort under the broad topic {nofo_topic}.

Please draft a research proposal, using the sample proposal template as your guide.

Research Effort Idea:
{idea}

Proposal Template:
{template}
""")
])
research_proposal_prompt = research_proposal_template.format(nofo_topic=topic, idea=chosen_idea_rp, template=research_proposal_template)
In [70]:
research_plan = invoke_openai_chat(research_proposal_prompt, model, oai_key, oai_base, temperature=0)
In [71]:
display(Markdown(research_plan.content))

Research Proposal: Exploring the Impact of Social Media on Young Adult Mental Health

Title: Fragile Minds: Exploring the Link Between Social Media and Young Adult Mental Health

Principal Investigators:

  • Ben Cohen, Whiting School of Engineering, Johns Hopkins University, Baltimore, MD, USA
  • Ian McCulloh, Johns Hopkins University, The Brain Rise Foundation, Orlando, FL, USA

Abstract: The mental health crisis among preteens and teenagers is often linked to the increasing ubiquity of social media. This research aims to examine the correlation between college students' social media usage and mental health concerns, focusing on recent developments in the social-media sphere, such as TikTok's rise and Instagram's pivot to video. Using a random sample of 254 undergraduate students, we explore correlations between social media use, fear of missing out (FoMO), loneliness, and personality traits.

Introduction: Social media has become integral to daily life, with significant usage among college students. Concerns about its impact on mental health are growing, with studies linking high usage to increased perceptions of social isolation. This research tests the hypothesis that high social media use correlates with low self-esteem, low social support, depression, and poor mental wellness.

Background: The literature documents a decline in young adult mental health, with social media often blamed. However, recent changes in social media platforms necessitate updated research. This study addresses this gap by focusing on TikTok and Instagram's video content and their impact on mental health.

Methodology:

  • Data Collection: Anonymous surveys were distributed to 4,000 undergraduate students at a mid-Atlantic university, with 254 valid responses analyzed.
  • Survey Design: Questions were based on validated scales for social media use, need to belong, loneliness, and FoMO, with personality traits assessed using the Adjective-Based Personality Test.
  • Analysis: Spearman’s rank correlation coefficients were calculated to assess correlations between social media use and mental health indicators. Multiple regression was used to measure the impact of different factors on social media behavior.

Results:

  • Social media use is moderately correlated with FoMO and a general need for use.
  • Personality traits, such as neuroticism and agreeableness, influence social media behavior.
  • The shift to video content may reduce the negative impact of social media on mental health.

Conclusion: While strong correlations were not found, moderate correlations suggest a shift in social media behavior among young adults, potentially reducing mental health risks. Future research should explore video-based social media's impact and behaviors indicating mental health struggles.

Significance: Understanding social media's role in the mental health crisis is crucial for developing interventions. This research contributes to the evolving literature and highlights the need for further investigation into video content's impact on mental health.

References:

  • Ortiz-Ospina, E. (2019). The rise of social media.
  • Stolzenberg, E. B., et al. (2020). The American freshman: National norms fall 2019.
  • Murthy, V. (2023). Our Epidemic of Loneliness and Isolation: The U.S. Surgeon General’s Advisory.
  • Primack, B. A., et al. (2017). Social media use and perceived social isolation among young adults in the U.S.
  • Lipson, S. K., et al. (2022). Trends in college student mental health and help-seeking by race/ethnicity.

Appendix:

  • Survey questions and scales
  • Detailed statistical analysis results
  • Additional references and literature review

This proposal outlines a comprehensive study to explore the nuanced relationship between social media usage and mental health among young adults, with a focus on recent platform changes and their implications.

In [ ]:
# @title **Optional Part - Creating a PDF of the Research Proposal**
# The code in this cell block is used for printing out the output in the PDF format

pdf = MarkdownPdf()
pdf.add_section(Section(research_plan.content))
pdf.save("/Users/mjn/code/data/gaif/ProjectFiles/AIGEN_ReseachProposalFirstDraft.pdf")

Step 5: Proposal Evaluation Against NOFO Criteria - [3 Marks]¶

Use the LLM to evaluate the generated proposal (LLM-as-Judge) and assess its alignment with the NOFO criteria.


Note: 2 marks are awarded for the prompt and 1 mark for the successful completion of this section, including debugging or modifying the code if necessary.

TASK: Write an Prompt which can be used to evaluate the Research Proposal based on:

  1. Innovation
  2. Significance
  3. Approach
  4. Investigator Expertise
  • Ask the LLM to rate on each of the criteria from 1 (Poor) to 5 (Excellent)
  • Ask the LLM to provide the resonse in the json format
name: Innovation
    justification: "<Justification>"
    score: <1-5>
    strengths: "<Strength 1>"
    weaknesses: "<Weakness 1>"
    recommendations: "<Recommendation 1>"
In [76]:
evaluation_template = ChatPromptTemplate.from_messages([
    ("system", "You are an expert reviewer for research proposals."),
    ("user", """
Evaluate the following draft Research Proposal on these four criteria:
- Innovation
- Significance
- Approach
- Investigator Expertise

For each, provide:
- justification (brief explanation)
- score (1=Poor, 5=Excellent)
- strengths (one)
- weaknesses (one)
- recommendations (one)

Respond ONLY in this JSON format:

{{
  "Innovation": {{
    "justification": "<Justification>",
    "score": <1-5>,
    "strengths": "<Strength 1>",
    "weaknesses": "<Weakness 1>",
    "recommendations": "<Recommendation 1>"
  }},
  "Significance": {{
    "justification": "<Justification>",
    "score": <1-5>,
    "strengths": "<Strength 1>",
    "weaknesses": "<Weakness 1>",
    "recommendations": "<Recommendation 1>"
  }},
  "Approach": {{
    "justification": "<Justification>",
    "score": <1-5>,
    "strengths": "<Strength 1>",
    "weaknesses": "<Weakness 1>",
    "recommendations": "<Recommendation 1>"
  }},
  "Investigator Expertise": {{
    "justification": "<Justification>",
    "score": <1-5>,
    "strengths": "<Strength 1>",
    "weaknesses": "<Weakness 1>",
    "recommendations": "<Recommendation 1>"
  }}
}}

Draft Research Proposal:
{proposal_text}
""")
])
evaluation_prompt = evaluation_template.format(proposal_text=research_plan.content)
In [78]:
eval_response = invoke_openai_chat(evaluation_prompt, model, oai_key, oai_base, temperature=0)
In [85]:
eval_str = regex_valid_json(eval_response.content)
In [87]:
json_resp = json.loads(eval_str)
In [88]:
for key, value in json_resp.items():
  print(f"---\n{key}:")
  if isinstance(value, list):
    for item in value:
      for k, v in item.items():
        print(f"  {k}: {v}")
      print("="*50)
  elif isinstance(value, dict):
    for k, v in value.items():
      print(f"  {k}: {v}")
  else:
    print(f"  {value}")
---
Innovation:
  justification: The proposal addresses a timely and relevant issue by focusing on the impact of recent changes in social media platforms, such as TikTok and Instagram's shift to video content, on mental health.
  score: 4
  strengths: Focuses on recent developments in social media platforms, which is a novel angle.
  weaknesses: The study design and methodology are fairly standard and do not introduce new techniques or technologies.
  recommendations: Consider incorporating innovative data collection methods, such as real-time social media usage tracking, to enhance the study's novelty.
---
Significance:
  justification: The research addresses a critical public health issue by exploring the link between social media and mental health, which is significant for developing interventions.
  score: 5
  strengths: Addresses a pressing mental health issue with potential implications for public health interventions.
  weaknesses: The study's focus on a single university may limit the generalizability of the findings.
  recommendations: Expand the study to include a more diverse sample from multiple universities to enhance the generalizability of the results.
---
Approach:
  justification: The methodology is well-structured, using validated scales and appropriate statistical analyses to explore correlations between variables.
  score: 4
  strengths: Utilizes validated scales and robust statistical methods to ensure reliable results.
  weaknesses: The response rate is relatively low, which may affect the study's power and representativeness.
  recommendations: Implement strategies to increase the response rate, such as follow-up reminders or incentives for participation.
---
Investigator Expertise:
  justification: The principal investigators are affiliated with reputable institutions and have relevant expertise in engineering and mental health research.
  score: 4
  strengths: Investigators are affiliated with prestigious institutions, indicating strong research capabilities.
  weaknesses: The proposal does not provide detailed information on the investigators' specific expertise in social media or mental health research.
  recommendations: Include more detailed information on the investigators' previous work and expertise related to the study's focus areas.

Step 6: Human Review and Refinement of Proposal¶

Perform Human Evaluation of the generated Proposal. Edit or Modify the proposal as necessary.

In [89]:
display(Markdown(research_plan.content))

Research Proposal: Exploring the Impact of Social Media on Young Adult Mental Health

Title: Fragile Minds: Exploring the Link Between Social Media and Young Adult Mental Health

Principal Investigators:

  • Ben Cohen, Whiting School of Engineering, Johns Hopkins University, Baltimore, MD, USA
  • Ian McCulloh, Johns Hopkins University, The Brain Rise Foundation, Orlando, FL, USA

Abstract: The mental health crisis among preteens and teenagers is often linked to the increasing ubiquity of social media. This research aims to examine the correlation between college students' social media usage and mental health concerns, focusing on recent developments in the social-media sphere, such as TikTok's rise and Instagram's pivot to video. Using a random sample of 254 undergraduate students, we explore correlations between social media use, fear of missing out (FoMO), loneliness, and personality traits.

Introduction: Social media has become integral to daily life, with significant usage among college students. Concerns about its impact on mental health are growing, with studies linking high usage to increased perceptions of social isolation. This research tests the hypothesis that high social media use correlates with low self-esteem, low social support, depression, and poor mental wellness.

Background: The literature documents a decline in young adult mental health, with social media often blamed. However, recent changes in social media platforms necessitate updated research. This study addresses this gap by focusing on TikTok and Instagram's video content and their impact on mental health.

Methodology:

  • Data Collection: Anonymous surveys were distributed to 4,000 undergraduate students at a mid-Atlantic university, with 254 valid responses analyzed.
  • Survey Design: Questions were based on validated scales for social media use, need to belong, loneliness, and FoMO, with personality traits assessed using the Adjective-Based Personality Test.
  • Analysis: Spearman’s rank correlation coefficients were calculated to assess correlations between social media use and mental health indicators. Multiple regression was used to measure the impact of different factors on social media behavior.

Results:

  • Social media use is moderately correlated with FoMO and a general need for use.
  • Personality traits, such as neuroticism and agreeableness, influence social media behavior.
  • The shift to video content may reduce the negative impact of social media on mental health.

Conclusion: While strong correlations were not found, moderate correlations suggest a shift in social media behavior among young adults, potentially reducing mental health risks. Future research should explore video-based social media's impact and behaviors indicating mental health struggles.

Significance: Understanding social media's role in the mental health crisis is crucial for developing interventions. This research contributes to the evolving literature and highlights the need for further investigation into video content's impact on mental health.

References:

  • Ortiz-Ospina, E. (2019). The rise of social media.
  • Stolzenberg, E. B., et al. (2020). The American freshman: National norms fall 2019.
  • Murthy, V. (2023). Our Epidemic of Loneliness and Isolation: The U.S. Surgeon General’s Advisory.
  • Primack, B. A., et al. (2017). Social media use and perceived social isolation among young adults in the U.S.
  • Lipson, S. K., et al. (2022). Trends in college student mental health and help-seeking by race/ethnicity.

Appendix:

  • Survey questions and scales
  • Detailed statistical analysis results
  • Additional references and literature review

This proposal outlines a comprehensive study to explore the nuanced relationship between social media usage and mental health among young adults, with a focus on recent platform changes and their implications.

Step 7: Summary and Recommendation - [2 Marks]¶

Based on the projects, learners are expected to share their observations, key learnings, and insights related to this business use case, including the challenges they encountered.

Additionally, they should recommend or explain any changes that could improve the project, along with suggesting additional steps that could be taken for further enhancement.

Observations, Key Learnings, and Insights:¶

I found this project both challenging and well framed. The use case provided a valuable opportunity to apply skills from throughout the course in a practical, business-focused setting. The project encouraged critical thinking and creative problem-solving when approaching the requirements. I have used the patterns here in my current professional endeavors.

Challenges Encountered:¶

A major challenge I faced was with the initial set of package imports provided. Many of the imports listed at the beginning of the project were unnecessary for the actual implementation, which caused errors and consumed significant time resolving dependency issues within the environment. Streamlining the list of required packages would greatly improve the setup experience.

Suggestions and Recommendations:¶

  • Improve Environment Setup: Review and update the list of imported packages to include only those that are essential for the project. This will help prevent installation errors and reduce time spent troubleshooting unnecessary dependencies.
  • Extension Opportunity: Considering the content covered earlier in the course, integrating a Retrieval-Augmented Generation (RAG) approach as an extension or optional challenge would offer learners a valuable opportunity to deepen their understanding and broaden the application of course concepts.

Additional Steps for Enhancement:¶

  • Provide clear guidance for environment setup and troubleshooting.
  • Offer optional advanced modules or challenges, such as implementing RAG, for those who wish to extend their learning further.
In [ ]: